package com.treasure.mall.zbq.common.oss.impl;

import org.springframework.core.io.AbstractResource;
import org.springframework.core.io.WritableResource;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.util.function.Supplier;

/**
 * @author guomw
 * @date 2018-02-24
 */
public class OSSFileResource extends AbstractResource implements WritableResource {
    public final URI fileUri;

    public OSSFileResource(URI fileUri) {
        this.fileUri = fileUri;
    }

    @Override
    public URI getURI() throws IOException {
        return fileUri;
    }

    @Override
    public boolean isWritable() {
        return false;
    }

    @Override
    public OutputStream getOutputStream() throws IOException {
        return null;
    }

    @Override
    public String getDescription() {
        return null;
    }

    @Override
    public InputStream getInputStream() throws IOException {
        return null;
    }
}
